update travis ci with build and test script adapted from jenkins.
authortsteven4 <tsteven4@gmail.com>
Wed, 5 Aug 2015 23:23:38 +0000 (17:23 -0600)
committertsteven4 <tsteven4@gmail.com>
Wed, 5 Aug 2015 23:23:38 +0000 (17:23 -0600)
.travis.yml
gpsbabel/Makefile.in
gpsbabel/build_and_test [new file with mode: 0755]

index 472b15b7a3cea1153d60055b58c7d49983af5309..ffcd1ed2a3105d4711bbc16ca181db6a4a809ebe 100644 (file)
@@ -6,5 +6,5 @@ before_install:
   - sudo apt-get update -qq
   - sudo apt-get install -y valgrind expat fop xsltproc
 script:
- - cd gpsbabel ; ./configure && make -j3 all && make gui &&  make doc && bash ./testo  && bash ./vtesto
-# TODO: build mac, test-all
+ - cd gpsbabel ; ./build_and_test
+# TODO: build mac
index 73c1ad9842bd40ebce5ad4fcf144b75add2c5d50..3752efc176f2955ff730689ebeee1c9599766fe4 100644 (file)
@@ -142,7 +142,8 @@ dep doc \
 release-sourcecheck release-tarball release-rpm \
 cross-configure \
 release-winbuild release-upload mac-upload release rpm mac-release \
-gui linux-gui mac-gui mac-gui-dmg msvc-build test-release
+gui linux-gui mac-gui mac-gui-dmg msvc-build test-release \
+toolinfo
 
 all: gpsbabel$(EXEEXT)
 
@@ -426,6 +427,10 @@ cov-upload: FORCE
        read junk
        cov-upload
 
+toolinfo:
+       -$(CC) --version
+       -$(QMAKE) -v
+
 # Machine generated from here down. 
 alan.o: alan.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h gbfile.h \
   cet.h inifile.h session.h src/core/datetime.h
diff --git a/gpsbabel/build_and_test b/gpsbabel/build_and_test
new file mode 100755 (executable)
index 0000000..ff6286a
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/bash -ex
+#
+# this script is triggered by SCM changes and is run on the build server.
+# output is conditionally mailed to gpsbabel-code.
+#
+# echo some system info to log
+uname -a
+if [ -e /etc/system-release ]; then
+       cat /etc/system-release
+fi
+if [ -e /etc/os-release ]; then
+       cat /etc/os-release
+fi
+git log -n 1
+# the timestamps from a svn co are unpredicatble.
+# this can cause problems if targets are checked into svn.
+# some of our targets are part of the svn repository to allow a
+# minimal set of build tools to be used.
+# touch these targets to make sure they aren't considered out of date.
+touch configure
+touch xcsv_tokens.gperf
+touch internal_styles.cc
+# build and test keeping output within the pwd.
+export GBTEMP=$(pwd)/gbtemp
+mkdir -p $GBTEMP
+./configure --with-doc=$(pwd)/gpsbabel_docdir
+make toolinfo
+make clean
+make
+make linux-gui
+make doc
+make gpsbabel.html
+make check
+#make torture
+rm -f vg.log
+./vtesto -l -j vg.log
+# eat the verbose output from test-all, including crash.output
+# this is a bit risky, if test-all generates an error we won't see what happened.
+echo "test-all in progress... (read/write test between all possible formats)"
+(LIBC_FATAL_STDERR_=1; export LIBC_FATAL_STDERR_; ./test-all -s -r reference/expertgps.gpx >/dev/null 2>&1)
+# summarize the test-all results, and generate an error if a fatal error was
+# detected by test-all.
+./test-all -J